{{- define "imagePullSecret" }}
{{- printf "{\"auths\": {\"%s\": {\"username\": \"%s\",\"password\": \"%s\", \"auth\": \"%s\"}}}" .Values.hub.addr .Values.hub.user .Values.hub.passwd (printf "%s:%s" .Values.hub.user .Values.hub.passwd | b64enc) | b64enc }}
{{- end }}

{{/*
Images
*/}}
{{- define "images.panther_operator" }}
{{- if eq .Values.cpu_mode "amd64" -}}
{{- print .Values.images_amd64.panther_operator }}
{{- else if eq .Values.cpu_mode "arm64" -}}
{{- print .Values.images_arm64.panther_operator }}
{{- end -}}
{{- end }}

{{- define "replicas.panther_operator" }}
{{- if eq .Values.replica_semantic "ha" -}}
{{- print .Values.ha_replicas.panther_operator }}
{{- else if eq .Values.replica_semantic "poc" -}}
{{- print .Values.poc_replicas.panther_operator }}
{{- end -}}
{{- end }}
